package io.jt808.proto.req;

import io.norland.buffer.AutoBuffer;
import io.norland.annotations.Proto;
import io.norland.proto.IProto;
import lombok.Data;

/**
 * 事件报告
 */
@Proto("0301")
@Data
public class JT0301 implements IProto {
    /**
     * 事件ID
     */
    private byte eventId;

    public final byte[] writeToBytes() {
        return new byte[]{eventId};
    }

    public final void readFromBuf(AutoBuffer buffer) {
        eventId = buffer.readByte();
    }
}